package bb.lanxing.lib.devices.ble.ble.characteristic.light;

import bb.lanxing.lib.kt.ByteArrayExtKt;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;

public final class LightFeature {
    private final int lightBeamFocus;
    private final LightBeamMode lightBeamMode;
    private final LightColor lightColor;
    private final int lightIntensity;
    private final LightModeSet lightModeSet;
    private final LightTypeSet lightTypeSet;

    public LightFeature(byte[] byteArray) {
        Intrinsics.checkNotNullParameter(byteArray, "byteArray");
        this.lightTypeSet = new LightTypeSet(ByteArrayExtKt.readUInt16LE(byteArray, 0));
        this.lightModeSet = new LightModeSet(ByteArrayExtKt.readInt32LE(byteArray, 2));
        this.lightBeamMode = LightBeamMode.Companion.from(ByteArrayExtKt.readUInt8(byteArray, 6));
        this.lightBeamFocus = ByteArrayExtKt.readUInt8(byteArray, 7);
        this.lightIntensity = ByteArrayExtKt.readUInt8(byteArray, 8);
        this.lightColor = LightColor.Companion.from(ByteArrayExtKt.readUInt8(byteArray, 9));
    }

    public LightTypeSet getLightTypeSet() {
        return this.lightTypeSet;
    }

    public LightModeSet getLightModeSet() {
        return this.lightModeSet;
    }

    public LightBeamMode getLightBeamMode() {
        return this.lightBeamMode;
    }

    public int getLightBeamFocus() {
        return this.lightBeamFocus;
    }

    public int getLightIntensity() {
        return this.lightIntensity;
    }

    public LightColor getLightColor() {
        return this.lightColor;
    }

    public String toString() {
        return "LightFeature(lightTypeSet=" + this.lightTypeSet + ", lightModeSet=" + this.lightModeSet + ", lightBeamMode=" + this.lightBeamMode + ", lightBeamFocus=" + this.lightBeamFocus + ", lightIntensity=" + this.lightIntensity + ", lightColor=" + this.lightColor + ')';
    }
}
